import requests

url = 'http://211.84.64.251/eportal/InterFace.do?method=login'

headers = {
    'Cookie': 'EPORTAL_COOKIE_USERNAME=2247102148; EPORTAL_COOKIE_SERVER=; EPORTAL_COOKIE_DOMAIN=; EPORTAL_COOKIE_SAVEPASSWORD=true; EPORTAL_COOKIE_OPERATORPWD=; EPORTAL_COOKIE_NEWV=true; EPORTAL_COOKIE_PASSWORD=0bef6b57cfd691bea20a46d9f3e9e961fe48636e58022bdb63574b840014876865d81584161883badf39db3fd41f80183ec879603d0225fbe34b448e4a951b3015ab1a2d683b66b15106b34d192bb28821397f24fdad7ab0ef9be1c294077e0549cf77813402581058a41d592e19e39d7a67b72ba0906eee099adb77d858f093; EPORTAL_AUTO_LAND=; EPORTAL_USER_GROUP=INC%E5%AD%A6%E7%94%9F; EPORTAL_COOKIE_SERVER_NAME=; JSESSIONID=E1A3E1EB9B96E1EC5C8ACAD4BA1251A3; JSESSIONID=A2814936C9E70A43708FD72793B6F4B6',
    'User-Agent': 'Apifox/1.0.0 (https://apifox.com)',
    'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
    'Accept': '*/*',
    'Host': '211.84.64.251',
    'Connection': 'keep-alive'
}

data = {
    'userId': '2247102148',
    'password': '0bef6b57cfd691bea20a46d9f3e9e961fe48636e58022bdb63574b840014876865d81584161883badf39db3fd41f80183ec879603d0225fbe34b448e4a951b3015ab1a2d683b66b15106b34d192bb28821397f24fdad7ab0ef9be1c294077e0549cf77813402581058a41d592e19e39d7a67b72ba0906eee099adb77d858f093',
    'service': '',
    'queryString': 'wlanuserip=10.101.80.229&wlanacname=SQSY_S18010&ssid=&nasip=211.84.64.1&snmpagentip=&mac=00919e465307&t=wireless-v2-plain&url=http://123.123.123.123/&apmac=&nasid=SQSY_S18010&vid=562&port=222&nasportid=AggregatePort%2034.05620000:562-0',
    'operatorPwd': '',
    'operatorUserId': '',
    'validcode': '',
    'passwordEncrypt': 'true'
}

try:
    response = requests.post(url, headers=headers, data=data)
    response.raise_for_status()  # 如果请求失败（例如，4xx 或 5xx 状态码），将引发异常
    print("请求成功！")
    print("状态码:", response.status_code)
    print("响应内容:")
    print(response.text)
except requests.exceptions.RequestException as e:
    print(f"请求失败: {e}")